import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'

import Index from '@/pages/index/Index.vue';
import TwoPage from "@/pages/twoPage/TwoPage.vue"

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/index"
  },
  {
    path: "/index",
    component: Index,
    name: "首页",
    children: [
      {
        path: "/index/two_page",
        component: TwoPage,
        name: "第二页",
      }
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

export default router
